<?php

namespace Mallocu\NuitInfoBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * Mallocu\NuitInfoBundle\Entity\Type
 * 
 * @author Rémi PIOTAIX <remi.piotaix@gmail.com>
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class Type {

    const REPO = 'MallocuNuitInfoBundle:Type';

    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string $nom
     *
     * @ORM\Column(name="nom", type="string", length=50)
     */
    private $nom;

    /**
     * @var string $picto
     *
     * @ORM\Column(name="picto", type="string", length=200, nullable=true)
     */
    private $picto;

    /**
     * @var Collection $monuments
     *
     * @ORM\ManyToMany(targetEntity="Mallocu\NuitInfoBundle\Entity\Monument", mappedBy="types")
     */
    private $monuments;

    public function __construct() {
        $this->monuments = new ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Set nom
     *
     * @param string $nom
     * @return Type
     */
    public function setNom($nom) {
        $this->nom = $nom;

        return $this;
    }

    /**
     * Get nom
     *
     * @return string 
     */
    public function getNom() {
        return $this->nom;
    }

    /**
     * Set picto
     *
     * @param string $picto
     * @return Type
     */
    public function setPicto($picto) {
        $this->picto = $picto;

        return $this;
    }

    /**
     * Get picto
     *
     * @return string 
     */
    public function getPicto() {
        return $this->picto;
    }

    /**
     * Set monuments
     *
     * @param integer $monuments
     * @return Type
     */
    public function setMonuments($monuments) {
        $this->monuments = $monuments;

        return $this;
    }

    /**
     * Get monuments
     *
     * @return integer 
     */
    public function getMonuments() {
        return $this->monuments;
    }

    public function __toString(){
        return $this->nom;
    }
}
